package Homeworks.HOMEWORK0315.Car;

public class Text {
    public static void main(String[] args) {
        run(new BMW());
        run(new QQ());
    }
    public static void run(Car car){
        if (car instanceof QQ){
            QQ q=(QQ)car;
            q.run();
        }else if (car instanceof BMW){
            BMW b=(BMW)car;
            b.run();
        }
    }
}
